// 滚动条记录， 适用于 keep-alive 组件
export default {
  data () {
    return {
      scrollTop: 0
    }
  },

  mounted () {
    const that = this;

    that.$el.addEventListener('scroll', that.$util.debounce(function () {
      that.scrollTop = that.$el.scrollTop;
    }, 50))
  },

  activated () {
    this.$el.scrollTop = this.scrollTop;
  }
}
